#:import Factory kivy.factory.Factory
<MyPopup@Popup>:
    auto_dismiss: False
    Button:
        text: 'Close me!'
        on_release: root.dismiss()


<Label>:
    font_name: 'Roboto'
<Button>:
    font_name: 'Roboto'
    border: (2, 2, 2, 2)
<TextInput>:    
    height: '20sp'
    line_height: '20sp'
    padding:['1sp','2sp','0sp','2sp']
BoxLayout:
    orientation: 'vertical'
    spacing: '10sp'
    
    BoxLayout:
        orientation: 'horizontal'
        size_hint: 1, 0.08
        spacing: '1sp'

        TextInput:
            id: txtUrl
            size_hint: 0.9, 1
            top: 1
            #text: app.txt_url
            hint_text: 'paste book url from hetushu.com or 99lib.net'

        Button:
            id: btn_start
            text: 'Start'
            size_hint_x:0.1
            on_press: app.btn_start_press(txtUrl.text)
        Button:
            text: 'Publish'
            size_hint_x:0.1
            #on_press: app.connect()            

    BoxLayout:
        orientation: 'horizontal'
        BoxLayout:
            orientation: 'vertical'
            Label:
                #size_hint: (0.8,1)
                text: 'Chapter List'
            ProgressBar:
                id:pbGenerate
                value: 70
            Label:
                id: lblInfo
                markup: True
                color: '#00ff00'

        BoxLayout:
            orientation: 'vertical'
            Label:            
                text: 'Title'
            TextInput:
                id: txtTitle
            Label:
                text: 'Author'            
            TextInput:
                id: txtAuthor
            Label:
                text: 'Cover'
            AsyncImage:
                id: imgCover
                source: 'http://hetushu.com/book/cover.pic/cover_1087.jpg'
            BoxLayout:
                orientation: 'horizontal'
                Button:
                    text: 'Generate'
                    id: btnGenerateCover
                    size_hint_x: 0.2
                Button:
                    text: 'Local Image'
                    id: btnLocalImage
                    size_hint_x: 0.2
                Button:
                    text: 'Image Url'
                    id: btnImageUrl
                    size_hint_x: 0.2
